package org.jiulou.util;

import java.io.BufferedInputStream;
import java.io.IOException;
import java.util.Properties;

public class AppConfigUtil{
	
	private static final Properties prop = new Properties();
	static{
		try {
			prop.load(new BufferedInputStream(AppConfigUtil.class.getClassLoader().getResourceAsStream("app.properties")));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public static String getProperty(String key){
		return prop.getProperty(key);
	}
	
	public static String getProperty(String key, String defaultValue){
		return prop.getProperty(key, defaultValue);
	}
}
